package net.oschina.archx.spring.datasource;

/**
 * Created by Archx on 2015/6/22 0022.
 */
public abstract class DBContextHolder {
    private static final ThreadLocal<String> DB_CONTEXT = new ThreadLocal<String>();

    public static final void setDbContext(String context) {
        DB_CONTEXT.set(context);
    }

    public static final String getDbContext(){
        return DB_CONTEXT.get();
    }

    public static final void removeDbContext() {
        DB_CONTEXT.remove();
    }
}
